Parsing As Tree Traversal

نویسنده

  • Dale Gerdemann
چکیده

This paper presents a unified approach to parsing, in which top-down, bot tomup and left-corner parsers m:e related to preorder, postorder and inorder tree traversals. It is shown that the simplest bo t tom-up and left-corner parsers are left recursive and must be converted using an extended Greibach normal form. With further partial execution, the bo t tom-up and left-corner parsers collapse togethe~ as in the I]IJP parser of Matsumoto . 1 I N T R O D U C T I O N In this paper , I present a unified approach to parsing, in which top-down, bo t tom-up and left-corner parsers are related to preorder, postorder and inorder tree traversals. To some extent , this connection is already clear since for each parsing strategy the nodes of the parse tree are constructed according to the corresponding tree traversal. It is somewhat trickier though, to actually use a tree traversa.l program as a parser since the resulting pa.rser may be left recursive. This left recursion can *The research presented in this paper was partially sponsored by Teilprojekt Bd "Constraints on Grammar for Efficient Generation" of the Sonderforschungsbereich 340 of the Deutsche Forschungsgemeinschaft. I wouhl also like to thank Guido Minnen and Dieter Martini for helpflfl comments. All mistakes are of course my own. ?KI. Wilhelmstr. 113, D-72074 T(ibingen, Germany, [email protected]. be el iminated, however, by employing a version of Greibach Normal Form which is extended to handle argument instantiations in definite clause grammars . The resulting parsers resemble the s tandard Prolog versions of versions of such parsers. One can then go one step further and partially execute the parser with respect to a part icular g rammaras is normally done with definite clause gra,,nn~a,'s (Per(,ir~ ~ Warren [JO]). a surprising result of this partial execution is l.ha.t the bo t tom-up and leftcorner parsers become identical when they are 1)oth partially executed. This may explain why the BUP parser of ~/lil.tSllll]OtO e t a ] . [6] [71 was ,'eferre.d tO as a bottona-u I) parser even though i t c lear ly fol lows a le f t -corner strategy. T R E E T R A V E R S A L

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

In-Order Transition-based Constituent Parsing

Both bottom-up and top-down strategies have been used for neural transition-based constituent parsing. The parsing strategies differ in terms of the order in which they recognize productions in the derivation tree, where bottom-up strategies and top-down strategies take post-order and pre-order traversal over trees, respectively. Bottom-up parsers benefit from rich features from readily built p...

متن کامل

Improved Head-Corner Parsing of Tree-Adjoining Grammars

In this paper we present a chart-based head corner parsing algorithm for Tree Adjoining Grammars (TAGs). We then present an improved algorithm that has a O(n) bound for the number of head-corner predictions as compared to previous approaches which have a bound of O(n). The improvement is made possible by changing the de nition of headcorner traversal and moving some aspects of top-down predicti...

متن کامل

An improved algorithm to reconstruct a binary tree from its inorder and postorder traversals

It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...

متن کامل

Subsumption{oriented Push{down Automata ?

This paper presents Subsumption{oriented Push{Down Auto-mata (SPDA), a very general stack formalism used to describe forest (\AND{ OR" tree) traversals. These automata may be used for parsing or the interpretation of logic programs. SPDA allow a Dynamic Programming execution which breaks computations into combinable, sharable and storable sub{computations. They provide computation sharing and o...

متن کامل

An improved algorithm to reconstruct a binary tree from its inorder and postorder traversals

It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1994